home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / login.preinst < prev    next >
Text File  |  2009-07-31  |  1KB  |  53 lines

  1. #! /bin/sh
  2.  
  3. #
  4. # see: dh_installdeb(1)
  5.  
  6. set -e
  7.  
  8. # summary of how this script can be called:
  9. #        * <new-preinst> `install'
  10. #        * <new-preinst> `install' <old-version>
  11. #        * <new-preinst> `upgrade' <old-version>
  12. #        * <old-preinst> `abort-upgrade' <new-version>
  13. #
  14. # for details, see http://www.debian.org/doc/debian-policy/ or
  15. # the debian-policy package
  16.  
  17. remove_md5() {
  18.     if md5sum $1 2>/dev/null |grep -q $2; then
  19.     cp $1 $1.pre-upgrade
  20.     sed -e '/^[^#][ \t]*assword[ \t]*required[ \t]*pam_unix.so/ s/ md5$//' $1 >$1.post-upgrade \
  21.         && mv $1.post-upgrade $1
  22.     fi
  23.     }
  24.  
  25.  
  26. case "$1" in
  27.     install|upgrade)
  28.         if [ "x$2" != "x" ] ; then
  29.         if dpkg --compare-versions $2 lt 1:4.0.3 ; then
  30.         remove_md5 /etc/pam.d/login 5e61c3334e25625fe1fa4d79cf9123ff
  31.         fi
  32.         fi
  33.         
  34.     ;;
  35.  
  36.     abort-upgrade)
  37.     ;;
  38.  
  39.     *)
  40.         echo "preinst called with unknown argument \`$1'" >&2
  41.         exit 1
  42.     ;;
  43. esac
  44.  
  45. # dh_installdeb will replace this with shell code automatically
  46. # generated by other debhelper scripts.
  47.  
  48.  
  49.  
  50. exit 0
  51.  
  52.  
  53.